<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        li{
            list-style: none;
        }
        .menu>li{
            float: left;
            border: 1px red solid;
            height: 30px;
            width: 80px;
        }
        .sub-menu>li{
            height: 0px;
            overflow: hidden;
            background-color: blue;
            transition: height 1s;
            color: seashell;
        }
        .menu > li:hover > .sub-menu > li{
            height: 30px;
        }
    </style>
</head>
<body>
    <ul class="menu">
        <li>书籍
            <ul class="sub-menu">
                <li>高级程序设计</li>
                <li>高级程序设计</li>
                <li>高级程序设计</li>
            </ul>
        </li>
        <li>书籍
            <ul class="sub-menu">
                <li>高级程序设计</li>
                <li>高级程序设计</li>
                <li>高级程序设计</li>
            </ul>
        </li>
        <li>书籍
            <ul class="sub-menu">
                <li>高级程序设计</li>
                <li>高级程序设计</li>
                <li>高级程序设计</li>
            </ul>
        </li>
    </ul>
    
</body>
</html>